package com.campus.merchant.controller;

import com.campus.common.bean.common.Resp;
import com.campus.merchant.service.OverviewDataService;
import com.campus.merchant.vo.merchant.OverviewDataVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 商户首页经营数据概览接口
 * @author AI
 */
@RestController
@RequestMapping("/overview")
@Api(tags = "商户首页经营数据概览")
public class OverviewDataController {
    @Resource
    private OverviewDataService overviewDataService;

    @ApiOperation("获取商户首页经营数据概览")
    @GetMapping("/data")
    public Resp<OverviewDataVo> getOverviewData(@RequestParam Integer merchantId) {
        OverviewDataVo vo = overviewDataService.getOverviewData(merchantId);
        return Resp.success(vo);
    }
}